package com.example.shoppingmall.service;

import com.example.shoppingmall.dao.InvoiceMapper;
import com.example.shoppingmall.pojo.Invoice;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Service
@Transactional
public class InvoiceService{
    @Autowired
    InvoiceMapper invoiceMapper;

    public List<Invoice> getAllinvoicelist(String cno,String ono, String dtime,String InvoiceNo, String orderno, String CourierNo, String phone, Integer pageno, Integer pageSize) {
        return invoiceMapper.getAllinvoicelist(cno,ono,dtime,InvoiceNo, orderno, CourierNo, phone, pageno, pageSize);
    }

    public int Invoicecount(String InvoiceNo, String orderno, String CourierNo, String phone) {
        return invoiceMapper.Invoicecount(InvoiceNo, orderno, CourierNo, phone);
    }

    public Invoice getlistById(int id) {
        return invoiceMapper.getlistById(id);
    }
}
